import React, { useState, useEffect } from 'react';
import { Button } from 'antd';

import withRouter from 'umi/withRouter';

import styles from './login.less';

const Login = (props: any) => {
  useEffect(() => {
    console.log('login start');
    return () => {
      console.log('login');
    };
  });
  const [count, setCount] = useState(0);
  return (
    <div className={styles.normal}>
      <h1>Page login {count}</h1>
      <Button
        type="primary"
        onClick={() => {
          setCount(1);
        }}
      >
        111
      </Button>
    </div>
  );
};

export default withRouter(Login);
